<?php

/**
 * 后台程序基类
 */

class App_Page_Admin extends App_Page
{
	private $currTopMenu = 'goods';
	private $currLeftMenu = 'goods_list';
	
    function __construct($lgmode)
    {
        parent::__construct($lgmode);

        $this->setHeadTmpl('head/head_page_admin.html');
        $this->setTailTmpl('tail/tail_page_admin.html');
    }
    
    protected function checkAuth()
    {
        parent::checkAuth();

        //todo: 判断是否是管理员
    }

    protected function setCssJs()
    {
    	parent::setCssJs();
    	
        $this->csslist = array(
            'css/admin.css',
        );
    }
    
    protected function outputHead()
    {
    	$this->smarty->assign('currTopMenu', $this->currTopMenu);
    	$this->smarty->assign('currLeftMenu', $this->currLeftMenu);
    	$this->smarty->assign('topMenus', Conf_Admin::$topMenus);
    	$this->smarty->assign('leftMenus', Conf_Admin::$leftMenus[$this->currTopMenu]);
    	parent::outputHead();
    }
    
    protected function setCurrMenu($top, $left)
    {
		$this->currTopMenu = $top;
		$this->currLeftMenu = $left;
    }
}
?>